import {
  BaseCmd,
  BaseQry,
  BaseView,
  CommonEnum,
} from '@/types/global-business';

export interface ShortLinkTemplateExpand {
  expiredIn?: CommonEnum;
  params?: any;
}

export interface ShortLinkTemplateView extends BaseView {
  type?: CommonEnum;
  sourceDomain?: string;
  targetDomain?: string;
  path?: string;
  expand?: ShortLinkTemplateExpand;
}

export interface ShortLinkTemplateAddCmd extends BaseCmd {
  type?: CommonEnum;
  sourceDomain?: string;
  targetDomain?: string;
  path?: string;
  expand?: ShortLinkTemplateExpand;
}

export interface ShortLinkTemplatePageQry extends BaseQry {
  type?: CommonEnum;
}

export interface ShortLinkInstanceExpand {
  params: any;
}

export interface ShortLinkInstanceView extends BaseView {
  type?: CommonEnum;
  router?: string;
  templateId?: number;
  sourceUrl?: string;
  targetUrl?: string;
  beginTime?: Date;
  endTime?: Date;
  userInfo?: string;
  expand?: ShortLinkInstanceExpand;
}

export interface ShortLinkInstanceQry extends BaseQry {
  router?: string;
}
